package yf.mall.entity;


import lombok.Setter;
import lombok.Getter;
import java.io.Serializable;
import java.util.Date;

import java.math.BigDecimal;

/**
 * 级别实体
 * 表名 level
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Sun Sep 29 10:46:03 CST 2019
 */
@Setter
@Getter
public class LevelEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    //
    private Long id;
    //级别名字
    private String name;
    //级别权重
    private Integer lv;
    //升级金额
    private BigDecimal amount;
    //ENUM-类型:"PUB-开放","PRI-内部"
    private Integer type;

    public int compareTo(LevelEntity levelEntity){
        if(this.lv > levelEntity.getLv()){
            return  -1;
        }
        if(this.lv < levelEntity.getLv()){
            return 1;
        }
        return 0;
    }

    public LevelEntity(){

    }

}
